<?php
/**
 * Created by PhpStorm.
 * User: YUWENXUAN
 * Date: 2017/4/14
 * Time: 17:42
 */

//强制模式
/*function sum(int ...$ints){
    return array_sum($ints);
}
print (sum(2,'3',4.1));
print (sum(2,'string',4.1));
*/


//严格模式
declare(strict_types=1);

function sun(int ...$ints1){
    return array_sum($ints1);
}
print (sun(2,3,4));
//print (sun(2,'3',4.1));
//print (sun(2,'string',4.1));

//严格模式下不是整数类型的会报错
